﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<sg.edu.nus.iss.prettyfaces.DataAccessLayer.Message>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	New Message
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>New Message</h2>
     <% Html.EnableClientValidation(); %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Compose New</legend>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.CreatedDate) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.CreatedDate) %>
                <%= Html.ValidationMessageFor(model => model.CreatedDate) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.SenderUserId) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.SenderUserId) %>
                <%= Html.ValidationMessageFor(model => model.SenderUserId) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ReceiverUserId) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.ReceiverUserId) %>
                <%= Html.ValidationMessageFor(model => model.ReceiverUserId) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Status) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Status) %>
                <%= Html.ValidationMessageFor(model => model.Status) %>
            </div>
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Text) %>
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.Text) %>
                <%= Html.ValidationMessageFor(model => model.Text) %>
            </div>
            <br />
            <br />
            <p>
                <input type="submit" value="Send" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("Back to Account", "Details") %>
    </div>
</asp:Content>
